package com.contact;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

import com.matang.R;
import com.modle.User;
import com.pyq.PyqMainFragment;
import com.view.XRecentConnectListView;
/**
 * 
 * @ClassName:TabRecentIyrActivity
 * @Description:TODO最近联系人
 * @author zhuw
 * @date 2013-8-4 下午9:24:29
 */
public class TabRecentIyrActivity extends BaseActivity {
	XRecentConnectListView listView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.act_tab_recent_connect);
		init();
	}

	void init() {
		mContext = TabRecentIyrActivity.this;
		findViews();
		initPaneData();

	}

	public void initPaneData() {
		
		header.headTitleTv.setVisibility(View.VISIBLE);
		header.headTitleTv.setText("最近联系人");
		header.headLeftTv.setVisibility(View.VISIBLE);
		header.headRightTv.setVisibility(View.GONE);
		header.headRightTv.setBackgroundResource(R.drawable.btn_bg_rect);
		header.headRightTv.setText("通讯录");
		header.headRightTv.setOnClickListener(new OnClickListener() {
			
	
			public void onClick(View arg0) {
				Intent intent =  new Intent();
				intent.setClass(getApplicationContext(), TabFriendActivity.class);
				startActivity(intent);
				
			}
		});
	//	header.headLeftTv.setText("朋友圈");
		header.headLeftTv.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
			finish();
				
			}
		});
		
	}
	

	@Override
	protected void findViews() {
		super.findViews();
		listView = (XRecentConnectListView) findViewById(R.id.xXListView);
	}

	@Override
	protected void onResume() {
		super.onResume();
		listView.initData(User.U_TYPE_YR);
		listView.startQNetData();
	}

	@Override
	protected void onPause() {
		super.onPause();
		listView.stopQNetData();
	}



}
